/**
 * 统计数据相关API
 */
import { api } from '@/utils/request'
import type { ApiResponse } from '@/types/api'

/**
 * 统计数据接口响应
 */
export interface StatsData {
  totalLocations: number
  pendingLocations: number
  approvedLocations: number
  rejectedLocations: number
  totalUsers: number
  adminUsers: number
  regularUsers: number
  totalRatings: number
  averageScore: number
}

/**
 * 获取统计数据
 */
export function getStats(): Promise<ApiResponse<StatsData>> {
  return api.get('/stats')
}
